<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="proposal.index.title"/></title>
<script type="text/javascript" src="http://kjgl.ahinfo.org.cn/egrantres/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="http://kjgl.ahinfo.org.cn/egrantres_app/js/app/proposal/irisPrpPrepare.js"></script>
	<script type="text/javascript" src="http://kjgl.ahinfo.org.cn/egrantres/js/jquery/jquery.js"></script>

<script type="text/javascript">
$(function(){
	queryflex();
	
	$("#proposal tr:not(:first):even").css("background", "#fff");
	$("#proposal tr:not(:first):odd").css("background", "#f5faff");
	$("#proposal tr:not(:first)").hover(
			function() {
				$(this).css("background", "#deebf9");
			},
			function() {
				$(this).css("background", $(this)[0].rowIndex % 2 == 0 ? "#f5faff" : "#fff");
		});
});
/** 显示工作进度 */
function showPrjProgress(keyCode,progressCode){
	var url = ctx + "/prpapprove/showPrjProgress";
	url = url + "?keyCodeStr="+keyCode+"&progressCode="+progressCode;
	url = url + "&TB_iframe=true&height=500&width=700";	
	tb_show("工作进度",url, false);
}
</script>
</head>
<body>
<form action="${ctx}/proposal/enter-prp" method="post" id="mainForm">
	<input type="hidden" value="${param.grantCode}" name="grantCode" id="grantCode">
	<input type="hidden" value="${param.subGrantCode}" name="subGrantCode" id="subGrantCode">
	<input type="hidden" value="" name="posCode" id="posCode">
	<input type="hidden" value="${param.menuId}" name="menuId" id="menuId">
	<input type="hidden" value="" name="ActionType" id="ActionType">
	<input type="hidden" value="${orgCode}" name="orgCode" id="orgCode">
</form>

	<%-- <div class="soBox">
			<div class="tit">
			<a id="queryFlex" href="###" class="off" title="<s:text name="proposal.index.hidden.tip"/>"><s:text name="proposal.index.hidden.title"/></a>
		</div>
			<div class="detail ico_note">
				<div class="text">
					<span class="color_blue"><s:text name="proposal.index.hidden.tip1"/></span><br />
					<span class="color_blue"><s:text name="proposal.index.hidden.tip2"/></span><br />
				</div>
			</div>
	</div> --%>
	

	 <!-- <div class="clear_h15"></div> -->
  <div class="List_box">
  <div class="t_increase">
			<span class="right">
				<c:if test="${grantOrgs!=null && fn:length(grantOrgs)>1}">
					选择单位：<%--<s:select list="#request.grantOrgs" listKey="orgCode" listValue="name" name="grantOrgCode"/> --%>
					<select id="grantOrgCode">
						<s:iterator value="#request.grantOrgs" var="orgs" >
						<option value="<iris:des3 code="${orgs.orgCode }" />"><s:property value="#orgs.name" /></option>
						</s:iterator>
					</select>
					<br/>
				</c:if>
				<input type="button" style="float: right;" class="btn_increase" value="" onclick="editAction('','','','add')" />
			</span>
			<s:text name="proposal.index.sqstxlb" />
		</div>
<div class="clear_h10"></div>
    <table border="0" cellspacing="0" cellpadding="0" class="table01" id="proposal" style="table-layout:fixed;">
        <tr>
          <th nowrap width="18%"><s:text name="proposal.index.table.xmmc"/></th>
           <th  width="4%">年度</th>
          <th width="15%" nowrap><s:text name="proposal.index.table.zzlb"/></th>
          <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
          <th width="9%">项目负责人</th>
          </security:authorize>
			<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
			<th width="12%">申报单位</th>	
			</security:authorize>
          <th width="15%" nowrap><s:text name="proposal.index.table.tjsj"/></th>
         <%--  <th width="110"><s:text name="proposal.index.table.status"/></th> --%>
          <th width="9%" nowrap><s:text name="proposal.index.table.processview"/></th>
          <th width="8%" nowrap><s:text name="proposal.index.table.pdf"/></th>
          <th width="5%" nowrap><s:text name="proposal.index.table.examinationReport" /></th>
          <th width="14%" nowrap><s:text name="proposal.index.table.operate"/></th>
        </tr>
        <c:forEach var="pro" items="${proList}">
			<tr id="pro_${pro.posCode}">
				<td align="left" style="word-wrap:break-word;">
					<a href="###" onclick="javascript:viewAction('<iris:des3 code="${pro.posCode}|${curDate}" encryptKey="111111222222333333444444" />','<iris:des3 code="${pro.grantCode}|${curDate}" encryptKey="111111222222333333444444" />','<iris:des3 code="${dataObj.subGrantCode}|${curDate}" encryptKey="111111222222333333444444" />')" class="yase"><c:out value="${pro.zhTitle}"/></a>
				</td>
				<td align="center">
					<c:out value="${pro.statYear}" />
				</td>
				<td>
					<!-- 
					       统一保留只显示项目类别  modify by zj，
					       领域申报书需要显示父项目类别和子项目类别 modify by zk,
					-->
					<c:choose>
					   <c:when test="${pro.grantCode == 51}">
					       <!-- 科技攻关 -->
					       <c:out value="${pro.grantName}" /><c:if test="${pro.subGrantCode !=pro.grantCode }"><br/>——<c:out value="${pro.subGrantName}" /></c:if>
					   </c:when>
					   <c:when test="${pro.grantCode == 56}">
					       <!-- 公益性技术应用研究联动计划 -->
					       <c:out value="${pro.grantName}" /><c:if test="${pro.subGrantCode !=pro.grantCode }"><br/>——<c:out value="${pro.subGrantName}" /></c:if>
					   </c:when>
					   <c:otherwise>
					       <!-- 统一 -->
					       <c:out value="${pro.subGrantName}" />
					   </c:otherwise>
					</c:choose>
					
					
				</td>
				<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
				<td>
					<c:out value="${pro.psnName}" />
				</td>
				</security:authorize>
				<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
				<td>
					<c:if test="${not empty pro.orgName }"><c:out value="${pro.orgName}" /></c:if>
					<c:if test="${empty pro.orgName }"><c:out value="${defaultOrgName}" /></c:if>
				</td>
				</security:authorize>
				<td nowrap>
					 <fmt:formatDate value="${pro.submitDate}" pattern="yyyy-MM-dd HH:mm:ss" />
				</td>
				<td>
						<center>
						<!-- 
						<a href="###"  onclick="javascript:viewPrpProcess('<iris:des3 code="${pro.posCode}|${curDate}" encryptKey="111111222222333333444444" />','${pro.status}',350,640)" class="yase">
							
						</a>
						 -->
						<a href="###" title="${pro.zh_cn_statusName}" onclick="javascript:showPrjProgress('<iris:des3 code="${pro.posCode}"/>','${pro.progressCode}')" class="yase">${pro.zh_cn_statusName}</a>
					</center>	
					
					<c:if test="${pro.status=='10' ||pro.status=='98'}">
					</c:if>
				</td>
				
<%-- 				<td align="center">
					<a href="###"  onclick="javascript:viewPrpProcess('<iris:des3 code="${pro.posCode}|${curDate}" encryptKey="111111222222333333444444" />','${pro.status}')" class="yase">进度查看</a>
				</td> --%>
				<!-- PDF文件下载查看 -->	
				<td align="center">
<%-- 				   <a href="#" onclick="return genPdf('<iris:des3 code="${pro.posCode}"/>');" class="yase ico_pdf">查看${pro.fbl.pdfCode }</a>
 --%>				   <a href="###" onclick="return genPdf('<iris:des3 code="${pro.posCode}" />','<iris:des3 code="${pro.fbl.pdfCode }"/>');" class="yase ico_pdf">查看</a>
                       <c:if
									test="${not empty pro.introPdfCode}">
									<a href="###"
										onclick="return genIntroPdf('<iris:des3 code="${pro.posCode}" />','proposalIntro','<iris:des3 code="${pro.introPdfCode }"/>');"
										class="yase ico_pdf">简介</a>
								</c:if>
						<c:if test="${pro.subGrantCode eq '20541' and pro.status eq '08'}">
							<a href="###" onclick="return zsPDF('<iris:des3 code="${pro.posCode}" />','pay_offs_certificate','<iris:des3 code="23344"/>');" class="yase ico_pdf">备案证书</a>
						</c:if>
				</td>
				<!-- 审核意见 -->
				<td align="center">
					<c:if test="${not (pro.status=='00' &&  empty pro.oldStatus )}"><!-- 隐藏查看按钮 -->
						<a href="###" onclick="auditCommentView('<iris:des3 code="${pro.posCode}"></iris:des3>')" class="yase "><s:text name="proposal.index.table.attach.view" /></a>
					</c:if>
				</td>
				<!-- 操作 -->
				<td align="center">
					<c:if test="${pro.status==null||pro.status==''||pro.status=='00'||pro.status=='10'||pro.status=='11'||pro.status=='12'||pro.status=='13'||pro.status=='14'}">
					   <c:if test="${pro.is_guoqi == null || pro.is_guoqi == ''  || (pro.is_guoqi != null && pro.is_guoqi == 'NO')}">
						<a href="###" onclick="editAction('${pro.posCode}','${pro.grantCode}','${pro.subGrantCode}','edit')" class="yase edit" ><s:text name="proposal.index.table.update"/>/ <s:text name="proposal.enter.btn.submit"/></a>
					   </c:if>
						<a href="###" onclick="editAction('${pro.posCode}','${pro.grantCode}','${pro.subGrantCode}','del')" class="yase delete"><s:text name="proposal.index.table.delete"/></a>
					</c:if>
				</td>
			</tr>
		</c:forEach>
    </table>
  </div>
</div>
</body>
</html>